package org.cyb.demo.dao;

import org.apache.ibatis.annotations.Param;
import org.cyb.demo.domain.Course;
import org.cyb.demo.domain.Major;

import java.util.List;


public interface CourseMapper {

    List<Course> selectByMajorName(
            @Param("major")Major major
    );

    List<Course> selectByCourseName(
            @Param("course")Course course
    );

    List<Course> selectAll();

    Course selectOneByName(
            @Param("course")Course course
    );

    Course selectOneById(
            @Param("course")Course course
    );

    void delete(
            @Param("course")Course course
    );

    int insert(
            @Param("course")Course course,
            @Param("major")Major major
    );
}
